package com.qaml.mes.device.api;

import com.earth.output.OutputMessage;
import com.qaml.mes.device.config.FeignClientEncoder;
import com.qaml.mes.message.dto.dingtalk.DingMsgDTO;
import com.qaml.mes.message.vo.dingtalk.DingTalkResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName IDingTalkService
 * @Description 发送钉钉工作通知
 * @Author leikai
 * @Date 2023/10/24 16:47
 * @Version 1.0
 */
@Component
@FeignClient(value = "message-center",configuration = { FeignClientEncoder.class})
public interface IDingTalkService {

    /**
     * 钉钉发送消息
     * @param dingMsgDTO
     * @return
     */
    @RequestMapping(value = "/message/dingTalk/send/message", method = RequestMethod.POST)
    OutputMessage<List<DingTalkResultVO>> sendMessage(@RequestBody DingMsgDTO dingMsgDTO);
}